﻿
using System;
using System.IO;
using System.Linq;
using System.Text;
using System.Collections.Generic;
using System.Runtime.Serialization;
using System.Net;
using System.Net.Http;
using System.Web.Http;


namespace LightSO.CMS.Controllers.Api
{
	public class ArticleController : BaseApiController
	{
		[AcceptVerbs("POST", "GET", "PUT")]
		public LightSO.CMS.ServiceArticle.Article Get(int id)
		{
			var client = new LightSO.CMS.ServiceArticle.Article1Client();
			return client.Get(id);
		}

		[AcceptVerbs("POST", "GET", "PUT")]
		public void Save(LightSO.CMS.ServiceArticle.Article info)
		{
			var client = new LightSO.CMS.ServiceArticle.Article1Client();
			client.Save(info);
		}

		[AcceptVerbs("POST", "GET", "PUT")]
		public void Remove(int id)
		{
			var client = new LightSO.CMS.ServiceArticle.Article1Client();
			client.Remove(id);
		}

		[AcceptVerbs("POST", "GET", "PUT")]
		public LightSO.CMS.ServiceArticle.Article[] Page(string pageIndex, string pageSize, string sort)
		{
			var client = new LightSO.CMS.ServiceArticle.Article1Client();
			return client.Page(pageIndex,pageSize,sort);
		}

		[AcceptVerbs("POST", "GET", "PUT")]
		public LightSO.CMS.ServiceArticle.Article[] List(string sort)
		{
			var client = new LightSO.CMS.ServiceArticle.Article1Client();
			return client.List(sort);
		}

		[AcceptVerbs("POST", "GET", "PUT")]
		public LightSO.CMS.ServiceArticle.Article[] Find(string keyword)
		{
			var client = new LightSO.CMS.ServiceArticle.Article1Client();
			return client.Find(keyword);
		}


	}
} 


